package com.ticket.sass.admin.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ticket.sass.common.entity.tenant.NoticePositionEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ywb
 * @since 2024-03-26
 */
public interface NoticePositionMapper extends BaseMapper<NoticePositionEntity> {
    @Select("""
    SELECT
        position
    FROM
        notice_positions
    WHERE
        notice_id = #{noticeId}
    AND
        deleted_at IS NULL
    """)
    List<Short> getPositionArrayByNoticeId(@Param("noticeId") Long noticeId);

}
